<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?=config_item('my_title')?></title>
    <base href="<?=base_url()?>">
    <link rel="stylesheet" href="plugin/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
<?php require_once(VIEWPATH.'include/header.html');?>
<!-- 主内容区域 -->
<div class="container-fluid iframe-container">
    <?php require_once(VIEWPATH.'include/sidebar.html');?>
    <!-- 主面板 -->
    <div class="iframe-main">
        <div class="iframe-main-section">
            <div class="section_container">
                <div class="panel">
                    <div class="panel-heading">
                        <div class="panel-title"><?=$section_name.go_back()?></div>
                    </div>
                    <form class="form-horizontal ajax-form-hook" action="<?=$save_url?>" method="post">
                        <div class="panel-body">
                            <div class="form-group">
                                <div class="col-xs-2 control-label">所属栏目</div>
                                <div class="col-xs-3">
                                    <?=$cols?>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-2 control-label">模型</div>
                                <div class="col-xs-3">
                                    <?=$model?>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-2 control-label">名称</div>
                                <div class="col-xs-3">
                                    <input type="text" name="name" class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-2 control-label"><i class="required"></i>目录</div>
                                <div class="col-xs-3">
                                    <input type="text" name="dir" class="form-control" datatype="*"
                                           ajaxurl="<?=$check_dir_url?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-2 control-label">URL</div>
                                <div class="col-xs-3">
                                    <input type="text" name="url" class="form-control">
                                    <p class="help-block">url比目录优先级高</p>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-2 control-label">打开方式</div>
                                <div class="col-xs-5 radio">
                                    <?=$dict['target']?>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-2 control-label">状态</div>
                                <div class="col-xs-5 radio">
                                    <?=$dict['display']?>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-2 control-label">排序</div>
                                <div class="col-xs-2">
                                    <input type="text" name="sort" value="100" class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-offset-2 col-xs-8">
                                    <button type="submit" name="submit_type" value="1"
                                            class="btn btn-primary submit-hook">
                                        保存
                                    </button>
                                    <button type="submit" name="submit_type" value="2"
                                            class="btn btn-default submit-hook">保存并新增
                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" src="plugin/require.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript">
    require(['unit'], function (unit) {
        unit.ajaxForm({
            tiptype: 3
        });
    });
</script>
</body>
</html>